package Services;

import java.util.Comparator;

import Entities.RTentry;

public class RTcomparator implements Comparator{
   
    public int compare(Object emp1, Object emp2){
   
        /*
         * parameter are of type Object, so we have to downcast it
         * to Employee objects
         */
       
        int emp1Score = ((RTentry)emp1).getScore();        
        int emp2Score = ((RTentry)emp2).getScore();
       
        if(emp1Score > emp2Score)
            return -1;
        else if(emp1Score < emp2Score)
            return 1;
        else
            return 0;    
    }
   
}
